# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=klettres
pkgver=20.04.3
pkgrel=0
arch="all !armhf"
url="http://edu.kde.org/klettres"
pkgdesc="Learn the Alphabet"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="extra-cmake-modules qt5-qtbase-dev qt5-qtsvg-dev kcompletion-dev kcrash-dev kdoctools-dev ki18n-dev knewstuff-dev kwidgetsaddons-dev kconfigwidgets-dev kcoreaddons-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/klettres-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # No tests

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="e8fedb9dbbb0f7d19cf7fe2f0687d56371eb716d8e40da762eef7798f40e462da137430497cc13331766c87652c9b32e65c839a0d7b5279e6ef36a59b0fc1ae4  klettres-20.04.3.tar.xz"
